<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-menu default-active='active' mode='horizontal' class='menu-unit'>
          <el-menu-item v-for='item in Container2' :index="'项目流程列表'===item.name?'active':'default'">
            <el-link @click="gotoMenu(item.url)" :type="'项目流程列表'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
        <table cellpadding="4" cellspacing="0" border="0" width="100%">
          <tr>
            <td class="containerBack">
              <el-form ref="form" :model="s_step" :rules="rules" label-width="100px" id="mvcfm">
                <div class="form-unit">
                  <span class="mvc-title-left"> 项目流程列表 </span>
                </div>
                <el-table :data="s_step">
                  <el-table-column label="#" align="center" type='index'>
                  </el-table-column>
                  <el-table-column label="项目名称" prop="description">
                  </el-table-column>
                  <el-table-column label="标准文件编号" prop="subject">
                  </el-table-column>
                  <el-table-column label="标准文件名称" prop="client_filename">
                  </el-table-column>
                  <el-table-column label="变更状态" prop="process_state">
                  </el-table-column>
                  <el-table-column label="项目描述" prop="process_des">
                  </el-table-column>
                  <el-table-column label="下一步骤" prop="nextstepid_name">
                  </el-table-column>
                  <el-table-column label="时长" prop="check_duration">
                  </el-table-column>
                  <el-table-column label="岗位" prop="role">
                  </el-table-column>
                </el-table>
              </el-form>
            </td>
          </tr>
        </table>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'检测项目'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'ItemsListRang',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_step: [],
        loading: false,
        Container: null,
        Container2: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "28847805EE1D403DBCD43478FD18BD08",
        name: "检测范围右菜单",
        selected: "检测项目"
      }, 'Container', this.vueparams);
      this.loadContainerMenu({
        pid: "28847805EE1D403DBCD43478FD18BD08",
        name: "工序上菜单",
        selected: "项目流程列表"
      }, 'Container2', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/mes/product/TechnologyAction/itemsListRang?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
